package rentalStore;

import java.rmi.AlreadyBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;

/**
 *
 * @author
 */
public class CarRentalStoreServer {

    public static void main(String[] args) throws RemoteException, AlreadyBoundException {
        System.out.println("The CarRentalStoreServer is Starting up..");
        System.setSecurityManager(null);
	SessionFactoryRemote sf = new SessionFactory();
	SessionFactoryRemote sfStub = (SessionFactoryRemote)UnicastRemoteObject.exportObject(sf,0);
        Registry registry = LocateRegistry.getRegistry("localhost");
        registry.bind("SessionFactory", sfStub);
        System.out.println("The CarRentalStoreServer is running..");
    }
}
